export function fn(params) {
    let list = []
    function fn2(params) {
        params.forEach(item => {
            if (item.children.length) {
                fn2(item.children)
            } else {
                list.push({
                    path: '/'+item.path,
                    name: item.authName,
                    component: () => import(`../views/${item.path}.vue`)
                })
            }
        })
    }
    fn2(params)
    return list
}